package com.data.collect.logic;

import android.os.Build;

/**
 * build 数据控制类
 */
public class BuildController {

    private static BuildController instance;

    public static BuildController getInstance() {
        if (instance == null){
            instance = new BuildController();
        }
        return instance;
    }

    /**
     *
     * @return 主板
     */
    public String board(){
        return Build.BOARD;
    }

    /**
     *
     * @return 主板
     */
    public String type(){
        return Build.TYPE;
    }

    /**
     *
     * @return 系统定制商
     */
    public String brand(){
        return Build.BRAND;
    }


    /**
     *
     * @return 设备参数
     */
    public String device(){
        return Build.DEVICE;
    }

    /**
     *
     * @return 显示屏参数
     */
    public String display(){
        return Build.DISPLAY;
    }

    /**
     *
     * @return 唯一编号
     */
    public String fingeprint(){
        return Build.FINGERPRINT;
    }


    /**
     *
     * @return 硬件序列号
     */
    public String serial(){

        return Build.SERIAL;
    }


    /**
     *
     * @return 修订版本列表
     */
    public String id(){

        return Build.ID;
    }



    /**
     *
     * @return 硬件制造商
     */
    public String manufacturer(){
        return Build.MANUFACTURER;
    }



    /**
     *
     * @return 版本
     */
    public String model(){
        return Build.MODEL;
    }



    /**
     *
     * @return 硬件名
     */
    public String hardware(){
        return Build.HARDWARE;
    }


    /**
     *
     * @return 手机产品名
     */
    public String produce(){
        return Build.PRODUCT;
    }

    /**
     *
     * @return 描述build的标签
     */
    public String tags(){
        return Build.TAGS;
    }


    /**
     *
     * @return 当前开发代号
     */
    public String versionCodeName(){
        return Build.VERSION.CODENAME;
    }


    /**
     *
     * @return 源码控制版本号
     */
    public String versionIncremental(){
        return Build.VERSION.INCREMENTAL;
    }

    /**
     *
     * @return 版本字符串
     */
    public String versionRelease(){
        return Build.VERSION.RELEASE ;
    }

    /**
     *
     * @return 版本字符串
     */
    public int  versionSdkInt(){
        return Build.VERSION.SDK_INT ;
    }

    /**
     *
     * @return HOST值
     */
    public String  host(){
        return Build.HOST ;
    }

    /**
     *
     * @return USER
     */
    public String  user(){
        return Build.USER ;
    }

    /**
     *
     * @return time
     */
    public long  time(){
        return Build.TIME ;
    }

    @Override
    public String toString() {
        return
                "BOARD = "+board()+
                "\n DEVICE = "+device()+
                "\n display = "+display()+
                "\n FINGERPRINT = "+fingeprint()+
                "\n manufacturer = "+manufacturer()+
                "\n model = "+model()+
                "\n hardware = "+hardware()+
                "\n produce = "+produce()+
                "\n tags = "+tags()+
                "\n versionCodeName = "+versionCodeName()+
                "\n versionIncremental = "+versionIncremental()+
                "\n versionRelease = "+versionRelease()+
                "\n versionSdkInt = "+versionSdkInt()+
                "\n host = "+host()+
                "\n user = "+user()+
                "\n time = "+time()+
                "\n serial = "+serial()+
                "\n brand = "+brand()+
                "\n id = "+id()+
                "\n type = "+type()
                ;
    }
}
